package com.example.smartgreenhouse.service;

import com.example.smartgreenhouse.dto.UserStatsDTO;
import com.example.smartgreenhouse.entity.User;
import com.example.smartgreenhouse.exception.BusinessException;

public interface UserService {
    /**
     * 用户注册
     */
    User register(User user);

    /**
     * 用户登录
     */
    User login(String username, String password);

    /**
     * 修改用户密码
     */
    boolean updatePassword(String username, String oldPassword, String newPassword);

    User getUserByUsername(String username);

    UserStatsDTO getUserStatistics(String username) throws BusinessException;

}